<template>
	<div class="edit-birthday">
		<van-datetime-picker
		  v-model="currentDate"
		  type="date"
		  title="选择年月日"
		  :min-date="minDate"
		  confirm-button-text="完成"
		  @cancel="$emit('close')"
		  @confirm="$emit('confirm',{'field':'birthday','value':currentDate})"
		/>
	</div>
</template>

<script>
	export default {
		name:"editBirthday",
		props:{
			value:{
				type:String,
				defalut:'2018-12-20'
			}
		},
		data(){
			return {
				currentDate:this.value,
				minDate:new Date(1970, 1, 1)
			}
		}
	}
</script>

<style>
</style>
